<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
          integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
            integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
            crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
            integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
            crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
            integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
            crossorigin="anonymous"></script>
    <title>进销存管理系统</title>
</head>
<body>
<br>
<div class="container">
    <div class="row">
        <div class="col-md">
            <div class="float-right">
                <a class="text-muted" href="{:url('index/mian')}"><h2>进销存管理系统</h2></a>

            </div>
            <div>&nbsp;</div>


            <br>

            <div>
                <div class="">
                    <div>
                        <a class="text-muted" href="{:url('index/sub')}">
                            <button class="btn btn-danger btn-search" type="submit">录入库存</button>
                        </a>
                        <a class="text-muted" href="{:url('index/report')}">
                            <button class="btn btn-info btn-search" type="submit">销售记录</button>
                        </a>
                        <a class="text-muted" href="{:url('index/forms')}">
                            <button class="btn btn-info btn-search" type="submit">销售报表</button>
                        </a>

                    </div>
                    <div class="mt-1">
                        <a class="text-muted" href="{:url('index/out')}">
                            <button class="btn btn-info btn-search" type="submit">销售产品</button>
                        </a>
                        <a class="text-muted" href="{:url('index/back')}">
                            <button class="btn btn-info btn-search" type="submit">销售退回</button>
                        </a>
                        <a class="text-muted" href="{:url('index/warning')}">
                            <button class="btn btn-info btn-search" type="submit">库存预警</button>
                        </a>
                    </div>
                </div>


                    <form action="{:url('index/search')}">
                        <div class="input-group col-md-4 ml-0 pl-0 mt-1">
                            <input type="text" class="form-control" name="keys" placeholder="请输入型号/厂商">
                            <span class="input-group-btn ml-1 ">
                                <button class="btn btn-info btn-search">查询库存</button>

                            </span>
                        </div>
                    </form>


            </div>

            <!--            <div class="form-inline mt-1">-->
            <!--                <h6>共</h6><h5 class="text-info"> {$dataNum} </h5> <h6>条记录</h6>-->
            <!--            </div>-->

            <div class="form-inline mt-1 block">
                <!--                <h6>当前登录用户</h6><h5 class="text-danger"> {$user} </h5>-->
                <!--                <h6>——总库存:</h6><h5 class="text-danger">{$arrSum}</h5>-->
                <!--                <h6>——总价格:</h6><h5 class="text-danger">{$priceSum}</h5>-->
                <table class="table table-sm table-bordered">

                    <tr class="text-center">
                        <th scope="col">记录数：{$dataNum}</th>
                        <th scope="col">总库存：{$arrSum}</th>
                        <th scope="col">总价格：{$priceSum}</th>
                        <th scope="col">当前用户：{$user}</th>

                    </tr>


                </table>

            </div>
        </div>
    </div>
    <div class="container">

        <div class="row">

            <table class="table table-sm table-dark table-bordered">
                <thead>
                <tr class="text-center">
                    <th scope="col">#</th>
                    <th scope="col">商品型号</th>
                    <th scope="col">库存</th>
                    <th scope="col">厂商</th>
                    <th scope="col">分类</th>
                    <th scope="col">价格</th>
                    <th scope="col">操作</th>
                </tr>
                </thead>

                <tbody>
                {foreach $list as $key=>$vo }
                <tr>
                    <th class="text-center" scope="row">{$key+1}</th>
                    <!--                    {$vo.id}-->
                    <td>{$vo.name}</td>
                    <td class="text-center">{$vo.num}</td>
                    <td class="text-center">{$vo.firm}</td>
                    <td class="text-center">{$vo.sort}</td>
                    <th class="text-center">{$vo.price}</th>
                    <td class="text-center">
                        <!--                        <a class="text-muted" href="{:url('index/change')}">-->
                        <form action="{:url('index/change')}">
                            <input type="hidden" name="name" value="{$vo.name}">
                            <button class="btn btn-danger btn-sm btn-search" type="submit">修改</button>
                        </form>

                        <!--                        </a>-->
                    </td>
                </tr>
                {/foreach}

                </tbody>
            </table>


        </div>
    </div>


</body>
</html>